/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 *
 */

import { TaskNames } from '../common/task-names.js';
import { TargetTaskService } from '../service/target-task-service.js';
import { TestCopyMockConfigJson } from '../task/test-copy-mock-config-json.js';

import Task = TaskNames.Task;

/**
 * 测试框架执行mock时要把 build/default/intermediates/res/{default}/mock-config.json 。
 * mock-config.json 是由ets-loader生成到 intermediates 目录下的。
 * 拷贝到测试包 hap 中的resources/rawfile/mock/mock-config.json 。
 */
export class OhosTestCopyMockConfigJson extends TestCopyMockConfigJson {
  constructor(taskService: TargetTaskService) {
    super(taskService, Task.OHOS_TEST_COPY_MOCK_CONFIG_JSON);
  }

  initTaskDepends(): void {
    this.declareDepends('OhosTestCompileArkTS');
  }
}
